DE 10 2007 059 097 B3 discloses a gun lock having two hammers movably disposed on a lock support, a trigger bar dedicated to each hammer for holding or releasing the hammers, a trigger, and a disconnector disposed between the trigger and the trigger bars. The disconnector comprises two intermediate levers arranged parallel to each other, which are swivelably disposed on a main body which can be linearly moved within the lock support. The basic body with the intermediate levers pivotably disposed thereon serves as an inertial mass and, after a first shot has been fired, is displaced in such a manner that a gap is created between the intermediate levers and the trigger bars. Such an interruption of the connection between the intermediate levers and the trigger bars occurs when the firearm, during a rearward movement caused by the recoil, is slowed down by the shoulder of the shooter or rebounds from the shoulder in the forward direction. In addition, disposed inside the main body are locking slides which are associated with the intermediate levers and which are designed to ensure that, during a backward movement of the lock support caused by the recoil, said locking slides, due to their inertia, initially remain in place and come to rest in a forward locked position inside the main body. In this locked position, the intermediate levers are blocked, which prevents an unintended discharge of a second shot even during a recoil-induced backward movement of the lock support. In addition, the trigger also comprises a movable disconnector, which, because of its inertial mass, can be moved relative to the trigger between a rearward actuating position, in which the trigger is connected to the intermediate levers, and a forward disconnect position, in which the trigger is disconnected from the intermediate levers. This ensures that doubling, i.e., the unintended discharge of a second shot after firing the first intended shot, is prevented. However, the design of this prior-art gun lock is relatively complex and comprises a plurality of parts moving relative to each other and coordinated with each other.